import random
def generate():
    str = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
    one = random.randint(0,51)
    two = random.randint(0, 51)
    there = random.randint(0, 51)
    four = random.randint(0, 51)
    captcha = str[one]+str[two]+str[there]+str[four]
    return captcha

print("随机生成的验证码 : {}".format(generate()))
